package com.wmh.baseservice.merchant.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author wmh generator
 * @since 2022-03-16
 */
@ApiModel(value="MerchantPlotRegion对象", description="商家菜/果地分区表")
public class MerchantPlotRegion implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "区域id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0正常 1出租中 2已被租(该状态下商家id为已经租到该区域的商家id)")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "商家id")
    private Long merchantId;

    @ApiModelProperty(value = "菜地id")
    private Long plotId;

    @ApiModelProperty(value = "长 单位/m")
    private Double lon;

    @ApiModelProperty(value = "宽 单位/m")
    private Double wide;

    @ApiModelProperty(value = "区域名称")
    private String name;

    @ApiModelProperty(value = "0正常区域 1初始区域")
    private Integer type;

    @TableField(exist = false)
    private String plotName;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private String juli;

    @TableField(exist = false)
    private String storeAvatar;

    @TableField(exist = false)
    private String plotLabel;

    @TableField(exist = false)
    private String plotAddress;

    @TableField(exist = false)
    private String plotOverView;

    @TableField(exist = false)
    private String rentalMinPrice;

    public String getRentalMinPrice() {
        return rentalMinPrice;
    }

    public void setRentalMinPrice(String rentalMinPrice) {
        this.rentalMinPrice = rentalMinPrice;
    }

    public String getPlotOverView() {
        return plotOverView;
    }

    public void setPlotOverView(String plotOverView) {
        this.plotOverView = plotOverView;
    }

    public String getPlotAddress() {
        return plotAddress;
    }

    public void setPlotAddress(String plotAddress) {
        this.plotAddress = plotAddress;
    }

    public String getPlotLabel() {
        return plotLabel;
    }

    public void setPlotLabel(String plotLabel) {
        this.plotLabel = plotLabel;
    }

    public String getStoreAvatar() {
        return storeAvatar;
    }

    public void setStoreAvatar(String storeAvatar) {
        this.storeAvatar = storeAvatar;
    }

    public String getJuli() {
        return juli;
    }

    public void setJuli(String juli) {
        this.juli = juli;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getPlotName() {
        return plotName;
    }

    public void setPlotName(String plotName) {
        this.plotName = plotName;
    }
    public Long getId() {
        return id;
    }

    public MerchantPlotRegion setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public MerchantPlotRegion setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public MerchantPlotRegion setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public MerchantPlotRegion setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public MerchantPlotRegion setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public MerchantPlotRegion setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getMerchantId() {
        return merchantId;
    }

    public MerchantPlotRegion setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }
    public Long getPlotId() {
        return plotId;
    }

    public MerchantPlotRegion setPlotId(Long plotId) {
        this.plotId = plotId;
        return this;
    }
    public Double getLon() {
        return lon;
    }

    public MerchantPlotRegion setLon(Double lon) {
        this.lon = lon;
        return this;
    }
    public Double getWide() {
        return wide;
    }

    public MerchantPlotRegion setWide(Double wide) {
        this.wide = wide;
        return this;
    }
    public String getName() {
        return name;
    }

    public MerchantPlotRegion setName(String name) {
        this.name = name;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public MerchantPlotRegion setType(Integer type) {
        this.type = type;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String PLOT_ID = "plot_id";

    public static final String LON = "lon";

    public static final String WIDE = "wide";

    public static final String NAME = "name";

    public static final String TYPE = "type";

    @Override
    public String toString() {
        return "MerchantPlotRegion{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", merchantId=" + merchantId +
            ", plotId=" + plotId +
            ", lon=" + lon +
            ", wide=" + wide +
            ", name=" + name +
            ", type=" + type +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            MerchantPlotRegion.ID
            ,MerchantPlotRegion.STATUS
            ,MerchantPlotRegion.REMARK
            ,MerchantPlotRegion.VERSION
            ,MerchantPlotRegion.CREATE_TIME
            ,MerchantPlotRegion.UPDATE_TIME
            ,MerchantPlotRegion.MERCHANT_ID
            ,MerchantPlotRegion.PLOT_ID
            ,MerchantPlotRegion.LON
            ,MerchantPlotRegion.WIDE
            ,MerchantPlotRegion.NAME
            ,MerchantPlotRegion.TYPE
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}